//
//  MyOrder.m
//  reSearchDemo
//
//  Created by 云库 on 15/7/20.
//  Copyright (c) 2015年 Kiwaro. All rights reserved.
//

#import "MyOrder.h"
#import "ImageTouchView.h"
#import "MyOrderModel.h"
#import "MyOrderCell.h"
@interface MyOrder ()<UITableViewDataSource,UITableViewDelegate>
{
    UITableView *_tableView;
    NSMutableArray *AllDataSource;     /**< 全部数据源 */
    NSMutableArray *secondDataSource;  /**< 待付款数据源 */
    NSMutableArray *ThirdDataSource;   /**< 待发货数据源 */
    NSMutableArray *fourthDataSource;  /**< 待收货数据源 */
    NSMutableArray *fifthDataSource;   /**< 待评价数据源 */
    NSMutableArray *cellArr;           /**< 存放cell的数组*/
    NSMutableArray *BtnArr;            /**< 存放menu按钮的数组*/
    UIView *lineView;                  /**< 随菜单滚动的下划线*/
    cellType MyOrderCellType;          /**< cell的样式 */
}
@end

@implementation MyOrder

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    UIView *actionbar = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, 44)];
    self.navigationItem.titleView = actionbar;
    UILabel *lab = [[UILabel alloc] initWithFrame:CGRectMake(8, 0, 100, 40)];
    lab.text = @"我的订单";
    lab.font = [UIFont systemFontOfSize:20];
    lab.textColor = [UIColor whiteColor];
    [actionbar addSubview:lab];
    
    
    UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"btn_more"] style:UIBarButtonItemStyleDone target:self action:@selector(BtnAction:)];
    UIBarButtonItem *btn1 = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"btn_search"] style:UIBarButtonItemStyleDone target:self action:@selector(BtnAction:)];
    NSArray *ItemArr = [NSArray arrayWithObjects:btn,btn1, nil];
    
    self.navigationItem.rightBarButtonItems = ItemArr;
    
    
    [self AllocMenu];
    [self AllocTableView];
    [self loadModel];

}
#pragma mark --初始化菜单
-(void)AllocMenu {
    BtnArr = [NSMutableArray array];
    NSArray *titleArr = @[@"全部",@"待付款",@"待发货",@"待收货",@"待评价"];
    for (int i = 0; i<titleArr.count; i++) {
        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
        btn.frame = CGRectMake(CGRectGetWidth(self.view.frame)/5*i, 64, CGRectGetWidth(self.view.frame)/5, 44);
        btn.titleLabel.font = [UIFont systemFontOfSize:14];
        [btn setBackgroundColor:[UIColor clearColor]];
        [btn setTitle:titleArr[i] forState:0];
        [btn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
        [btn setTitleColor:[UIColor orangeColor] forState:UIControlStateSelected];
        [btn addTarget:self action:@selector(MenuBtnAction:) forControlEvents:UIControlEventTouchUpInside];
        if (i == 0) {
            btn.selected = YES;
        }
        [BtnArr addObject:btn];
        [self.view addSubview:btn];
        
    }
    lineView = [[UIView alloc] initWithFrame:CGRectMake(10, 104, CGRectGetWidth(self.view.frame)/5 - 20, 2)];
    lineView.backgroundColor = [UIColor orangeColor];
    [self.view addSubview:lineView];
}
#pragma mark --初始化tableview--
-(void)AllocTableView {
    _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 108, self.view.frame.size.width,self.view.frame.size.height - 108) style:UITableViewStylePlain];
    _tableView.delegate = self;
    _tableView.dataSource = self;
    _tableView.tableFooterView = [[UIView alloc] init];
    [self.view addSubview:_tableView];
}
#pragma mark --加载数据--
-(void)loadModel {
    switch ([self GetModelIndex]) {
        case 0:
        {
            //初始化数据源
            NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"如意旗帜店",@"MerchantsName",@"交易成功",@"TransactionStatus",@"图片名字",@"ImageUrl",@"锦旗制作/包邮/定做/订做/订作/制作/发泡/金粉字42*70一面起做",@"Context",@"￥33.00",@"Money",@"x13",@"Number",@"1",@"ObjectNumber",@"33.00",@"AllMoney",@"0.00",@"Freight",@"4",@"Type", nil];
            NSMutableDictionary *dic1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"淘宝旗帜店",@"MerchantsName",@"等待买家付款",@"TransactionStatus",@"图片名字",@"ImageUrl",@"锦旗制作/包邮/定做/订做/订作/制作/发泡/金粉字42*70一面起做",@"Context",@"￥33.00",@"Money",@"x13",@"Number",@"1",@"ObjectNumber",@"33.00",@"AllMoney",@"0.00",@"Freight",@"1",@"Type", nil];
            NSMutableDictionary *dic2 = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"天猫旗舰店",@"MerchantsName",@"快递已签收",@"TransactionStatus",@"图片名字",@"ImageUrl",@"锦旗制作/包邮/定做/订做/订作/制作/发泡/金粉字42*70一面起做",@"Context",@"￥33.00",@"Money",@"x13",@"Number",@"1",@"ObjectNumber",@"33.00",@"AllMoney",@"0.00",@"Freight",@"3",@"Type", nil];
            
            MyOrderModel *model1 = [[MyOrderModel alloc] initWithDictiomary:dic];
            MyOrderModel *model2 = [[MyOrderModel alloc] initWithDictiomary:dic1];
            MyOrderModel *model3 = [MyOrderModel statusWithDictionary:dic2];
            
            AllDataSource = [NSMutableArray array];
            for (int i = 0; i < 2; i++) {
                [AllDataSource addObject:model1];
                [AllDataSource addObject:model2];
                [AllDataSource addObject:model3];
            }
            
            
            //初始化cellArr个数
            [self InitializeCellArr:AllDataSource];
            //赋值cell的样式
            MyOrderCellType = AllCellType;

           break;
        }
        case 1:
        {
            NSMutableDictionary *dic1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"淘宝旗帜店",@"MerchantsName",@"等待买家付款",@"TransactionStatus",@"图片名字",@"ImageUrl",@"锦旗制作/包邮/定做/订做/订作/制作/发泡/金粉字42*70一面起做",@"Context",@"￥33.00",@"Money",@"x13",@"Number",@"1",@"ObjectNumber",@"33.00",@"AllMoney",@"0.00",@"Freight",@"1",@"Type", nil];
            MyOrderModel *model2 = [[MyOrderModel alloc] initWithDictiomary:dic1];
            secondDataSource = [NSMutableArray array];
            for (int i = 0; i < 8; i++) {
                [secondDataSource addObject:model2];
            }
            
            //初始化cellArr个数
            [self InitializeCellArr:secondDataSource];
            //赋值cell的样式
            MyOrderCellType = secondCellType;
            
            break;
        }
        case 2:
        {
            ThirdDataSource = [NSMutableArray array];
            
            //初始化cellArr个数
            [self InitializeCellArr:ThirdDataSource];
            //赋值cell的样式
            MyOrderCellType = ThirdCellType;
            
            break;
        }
        case 3:
        {
            NSMutableDictionary *dic2 = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"天猫旗舰店",@"MerchantsName",@"快递已签收",@"TransactionStatus",@"图片名字",@"ImageUrl",@"锦旗制作/包邮/定做/订做/订作/制作/发泡/金粉字42*70一面起做",@"Context",@"￥33.00",@"Money",@"x13",@"Number",@"1",@"ObjectNumber",@"33.00",@"AllMoney",@"0.00",@"Freight",@"3",@"Type", nil];
            MyOrderModel *model3 = [MyOrderModel statusWithDictionary:dic2];
            fourthDataSource = [NSMutableArray array];
            for (int i = 0; i < 8; i++) {
                [fourthDataSource addObject:model3];
            }
            
            //初始化cellArr个数
            [self InitializeCellArr:fourthDataSource];
            //赋值cell的样式
            MyOrderCellType = fourthCellType;
            
            break;
        }
        case 4:
        {
            NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"如意旗帜店",@"MerchantsName",@"交易成功",@"TransactionStatus",@"图片名字",@"ImageUrl",@"锦旗制作/包邮/定做/订做/订作/制作/发泡/金粉字42*70一面起做",@"Context",@"￥33.00",@"Money",@"x13",@"Number",@"1",@"ObjectNumber",@"33.00",@"AllMoney",@"0.00",@"Freight",@"4",@"Type", nil];
            MyOrderModel *model = [MyOrderModel statusWithDictionary:dic];
            fifthDataSource = [NSMutableArray array];
            for (int i = 0; i < 8; i++) {
                [fifthDataSource addObject:model];
            }
            
            //初始化cellArr个数
            [self InitializeCellArr:fifthDataSource];
            //赋值cell的样式
            MyOrderCellType = fifthCellType;
            break;
        }
            
        default:
            break;
    }
}
#pragma mark --初始化存放cell数组--
//初始化存放cell数组的个数
-(void)InitializeCellArr:(NSMutableArray *)arr {
    [cellArr removeAllObjects];
    cellArr = nil;
    cellArr = [NSMutableArray array];
    [arr enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        
        MyOrderCell *cell = [[MyOrderCell alloc] init];
        [cellArr addObject:cell];
    }];
}
#pragma mark --通过选中按钮获取当前菜单--
//获取当前菜单
-(NSInteger)GetModelIndex {
    __block NSInteger index;
    [BtnArr enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        UIButton *btn = (UIButton *)obj;
        if (btn.selected) {
            index = idx;
        }
    }];
    return index;
}
#pragma mark --通过当前菜单获取数据源--
-(NSMutableArray *)getDataSource {
    switch ([self GetModelIndex]) {
        case 0:
        {
            return AllDataSource;
        }
        case 1:
        {
            return secondDataSource;
        }
        case 2:
        {
            return ThirdDataSource;
        }
        case 3:
        {
            return fourthDataSource;
        }
        case 4:
        {
            return fifthDataSource;
        }
        default:
            return nil;
    }
}
#pragma mark -
#pragma mark --导航栏按钮响应函数--
-(void)BtnAction:(UIBarButtonItem *)sender {
    
}
#pragma mark --菜单按钮响应函数--
-(void)MenuBtnAction:(UIButton *)sender {
    int index = 0;
    for (int i = 0; i<BtnArr.count; i++) {
        UIButton *btn = BtnArr[i];
        btn.selected = NO;
        if (sender == BtnArr[i]) {
            index = i;
        }
    }
    [UIView animateWithDuration:0.2 animations:^{
        sender.selected = YES;
        lineView.frame = CGRectMake(CGRectGetWidth(self.view.frame)/5*index + 10, 104, CGRectGetWidth(self.view.frame)/5 - 20, 2);
    } completion:^(BOOL finished) {
        //初始化数据
        [self loadModel];
        [_tableView reloadData];
    }];
    
}

#pragma mark -
#pragma mark --tableViewDelegate&Datasource--
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return [self getDataSource].count;
    
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *indentifier = @"cell";
    MyOrderCell *cell = [tableView dequeueReusableCellWithIdentifier:indentifier];
    if (!cell) {
        cell = [[MyOrderCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:indentifier];
    }
    
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.celltype = MyOrderCellType;
    MyOrderModel *model = [self getDataSource][indexPath.row];
    cell.model = model;
    //注册通知
//    NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
//    [center addObserver:self selector:@selector(goHome:) name:@"GO_HOME_NOTIFICATION" object:nil];
    switch (MyOrderCellType) {
        case AllCellType:
        {
            DLog(@"cell.model.type = %@",model.Type);
            switch ([model.Type intValue]) {
                case 1:
                {
                    [cell.btn1 addTarget:self action:@selector(CellType1_Action:) forControlEvents:UIControlEventTouchUpInside];
                    cell.btn1.tag = 1000+indexPath.row;
                    [cell.btn2 addTarget:self action:@selector(CellType1_Action:) forControlEvents:UIControlEventTouchUpInside];
                    cell.btn2.tag = 2000+indexPath.row;
                    [cell.btn3 addTarget:self action:@selector(CellType1_Action:) forControlEvents:UIControlEventTouchUpInside];
                    cell.btn3.tag = 3000+indexPath.row;
                    break;
                }
                case 2:
                {
                    
                    break;
                }
                case 3:
                {
                    [cell.btn2 addTarget:self action:@selector(CellType3_Action:) forControlEvents:UIControlEventTouchUpInside];
                    cell.btn2.tag = 4000+indexPath.row;
                    [cell.btn3 addTarget:self action:@selector(CellType3_Action:) forControlEvents:UIControlEventTouchUpInside];
                    cell.btn3.tag = 5000+indexPath.row;
                    break;
                }
                case 4:
                {
                    [cell.btn2 addTarget:self action:@selector(CellType4_Action:) forControlEvents:UIControlEventTouchUpInside];
                    cell.btn2.tag = 6000+indexPath.row;
                    [cell.btn3 addTarget:self action:@selector(CellType4_Action:) forControlEvents:UIControlEventTouchUpInside];
                    cell.btn3.tag = 7000+indexPath.row;
                    break;
                }
                default:
                    break;
            }
            break;
        }
        case secondCellType:
        {
            [cell.btn1 addTarget:self action:@selector(CellType1_Action:) forControlEvents:UIControlEventTouchUpInside];
            cell.btn1.tag = 1000+indexPath.row;
            [cell.btn2 addTarget:self action:@selector(CellType1_Action:) forControlEvents:UIControlEventTouchUpInside];
            cell.btn2.tag = 2000+indexPath.row;
            [cell.btn3 addTarget:self action:@selector(CellType1_Action:) forControlEvents:UIControlEventTouchUpInside];
            cell.btn3.tag = 3000+indexPath.row;
            break;
        }
        case ThirdCellType:
        {
            break;
        }
        case fourthCellType:
        {
            [cell.btn2 addTarget:self action:@selector(CellType3_Action:) forControlEvents:UIControlEventTouchUpInside];
            cell.btn2.tag = 2000+indexPath.row;
            [cell.btn3 addTarget:self action:@selector(CellType3_Action:) forControlEvents:UIControlEventTouchUpInside];
            cell.btn3.tag = 3000+indexPath.row;
            break;
        }
        case fifthCellType:
        {
            [cell.btn2 addTarget:self action:@selector(CellType4_Action:) forControlEvents:UIControlEventTouchUpInside];
            cell.btn2.tag = 2000+indexPath.row;
            [cell.btn3 addTarget:self action:@selector(CellType4_Action:) forControlEvents:UIControlEventTouchUpInside];
            cell.btn3.tag = 3000+indexPath.row;
            break;
        }
            default:
            break;
    }
    
    return cell;
}
//通知执行的方法
-(void)goHome:(NSNotification *)anoti {
    NSDictionary *dic = [anoti userInfo];
    DLog(@"dic = %@",dic);
}

//cell高的设置方法
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    MyOrderCell *cell = cellArr[indexPath.row];
    cell.model = [self getDataSource][indexPath.row];
    
    return cell.height;
}
//cell的点击方法
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    //取消选中高亮状态
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    
//    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"%d",(int)indexPath.row],@"index", nil];
    //发送通知
//    NSNotificationCenter *cener = [NSNotificationCenter defaultCenter];
//    [cener postNotificationName:@"GO_HOME_NOTIFICATION" object:nil userInfo:dic];
}
//头视图
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    NSMutableArray *data = [self getDataSource];
    UIView *headView;
    if (!data.count) {
        headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(_tableView.frame), CGRectGetHeight(_tableView.frame))];
        headView.backgroundColor = [UIColor lightGrayColor];
        
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 40)];
        label.center = headView.center;
        label.text = @"无内容!";
        label.textAlignment = NSTextAlignmentCenter;
        label.font = [UIFont systemFontOfSize:25];
        [headView addSubview:label];
        
        return headView;
    }else {
        return nil;
    }
}
//设置表头的高
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    NSMutableArray *data = [self getDataSource];
    if (!data.count) {
        return CGRectGetHeight(_tableView.frame);
    }else {
        return 0;
    }
}

#pragma mark -
#pragma mark --cell上面btn点击事件--
#pragma mark --未付款按钮方法--
-(void)CellType1_Action:(UIButton *)sender {
    if (MyOrderCellType == AllCellType) {
        NSString *str1 = [NSString stringWithFormat:@"第%dcell,联系卖家",(int)sender.tag - 1000];
        NSString *str2 = [NSString stringWithFormat:@"第%dcell,取消订单",(int)sender.tag - 2000];
        NSString *str3 = [NSString stringWithFormat:@"第%dcell,付款",(int)sender.tag - 3000];
        
        switch (sender.tag/1000) {
            case 1:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str1 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
            case 2:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str2 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
            case 3:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str3 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
                
                
            default:
                break;
        }
    }else {
        NSString *str1 = [NSString stringWithFormat:@"第%dcell,联系卖家",(int)sender.tag - 1000];
        NSString *str2 = [NSString stringWithFormat:@"第%dcell,取消订单",(int)sender.tag - 2000];
        NSString *str3 = [NSString stringWithFormat:@"第%dcell,付款",(int)sender.tag - 3000];
        
        switch (sender.tag/1000) {
            case 1:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str1 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
            case 2:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str2 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
            case 3:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str3 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
                
                
            default:
                break;
        }
    }
    
}
#pragma mark --待发货按钮方法--
-(void)CellType2_Action:(UIButton *)sender {
    
    
}
#pragma mark --待收货按钮方法--
-(void)CellType3_Action:(UIButton *)sender {
    if (MyOrderCellType == AllCellType) {
        NSString *str2 = [NSString stringWithFormat:@"第%dcell,查看物流",(int)sender.tag - 4000];
        NSString *str3 = [NSString stringWithFormat:@"第%dcell,确认收货",(int)sender.tag - 5000];
        
        switch (sender.tag/1000) {
            case 4:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str2 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
            case 5:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str3 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
                
                
            default:
                break;
        }

    }else {
        DLog(@"点击cell %ld",(long)sender.tag);
        NSString *str2 = [NSString stringWithFormat:@"第%dcell,查看物流",(int)sender.tag - 2000];
        NSString *str3 = [NSString stringWithFormat:@"第%dcell,确认收货",(int)sender.tag - 3000];
        
        switch (sender.tag/1000) {
            case 2:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str2 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
            case 3:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str3 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
                
                
            default:
                break;
        }
    }
}
#pragma mark --待评价按钮方法--
-(void)CellType4_Action:(UIButton *)sender {
    if (MyOrderCellType == AllCellType) {
        NSString *str2 = [NSString stringWithFormat:@"第%dcell,删除订单",(int)sender.tag - 6000];
        NSString *str3 = [NSString stringWithFormat:@"第%dcell,评价",(int)sender.tag - 7000];
        
        switch (sender.tag/1000) {
            case 6:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str2 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
            case 7:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str3 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
                
                
            default:
                break;
        }

    }else {
        NSString *str2 = [NSString stringWithFormat:@"第%dcell,删除订单",(int)sender.tag - 2000];
        NSString *str3 = [NSString stringWithFormat:@"第%dcell,评价",(int)sender.tag - 3000];
        
        switch (sender.tag/1000) {
            case 2:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str2 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
            case 3:
            {
                UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:str3 delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil];
                [alert show];
                break;
            }
                
                
            default:
                break;
        }

    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
